﻿using System;
using System.Activities;
using Microsoft.Xrm.Sdk.Workflow;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Query;
using Microsoft.Xrm.Sdk.Messages;

namespace Hilteq.FetchXml
{
    internal static class Helpers
    {
        public static void Throw(string message, Exception innerException = null)
        {
            if (innerException == null)
            {
                throw new InvalidPluginExecutionException(message);
            }
            else
            {
                throw new InvalidPluginExecutionException(message, innerException);
            }
        }

    }
}